import request from '@/utils/request'

// 查询商户信息-地址列表
export function listMerchantAddress(query) {
  return request({
    url: '/business/admin/merchantAddress/list',
    method: 'get',
    params: query
  })
}

// 查询商户信息-地址详细
export function getMerchantAddress(id) {
  return request({
    url: '/business/admin/merchantAddress/' + id,
    method: 'get'
  })
}

// 新增商户信息-地址
export function addMerchantAddress(data) {
  return request({
    url: '/business/admin/merchantAddress',
    method: 'post',
    data: data
  })
}

// 修改商户信息-地址
export function updateMerchantAddress(data) {
  return request({
    url: '/business/admin/merchantAddress',
    method: 'put',
    data: data
  })
}

// 删除商户信息-地址
export function delMerchantAddress(id) {
  return request({
    url: '/business/admin/merchantAddress/' + id,
    method: 'delete'
  })
}


//修改收货地址状态
export function getCommonAreaList(parentId) {
  return request({
    url: '/sysCommonArea/getCommonArea/'+parentId,
    method: 'get',
  })
}